/*   The MIT License
 *   
 *   Carina Common
 *   Copyright (c) 2010-2011 Zdravko Velinov
 *   
 *   Permission is hereby granted, free of charge, to any person obtaining a copy
 *   of this software and associated documentation files (the "Software"), to deal
 *   in the Software without restriction, including without limitation the rights
 *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *   copies of the Software, and to permit persons to whom the Software is
 *   furnished to do so, subject to the following conditions:
 *
 *   The above copyright notice and this permission notice shall be included in
 *   all copies or substantial portions of the Software.
 *
 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 *   THE SOFTWARE.
 */

#include "carina/common/global.hh"
#include "carina/common/memory.hh"
#include "carina/common/logging.hh"

#if !defined(NDEBUG) && !defined(_WIN32) && defined(HAS_QT4)
#   define QT_DEBUG_GUI
#endif

#ifdef QT_DEBUG_GUI
#include <QApplication>
// Force Qt initialization because it may or may not get initialized depending
// on whether it is a debug build or release.
#   define CE_INIT_QT(argc, argv)
#   define CE_INIT_CARINA_COMMON(argc, argv) QApplication qapp(argc, argv); Carina::CommonLibrary common_lib;
#else
#   define CE_INIT_QT(argc, argv) QApplication qapp(argc, argv)
#   define CE_INIT_CARINA_COMMON(argc, argv) Carina::CommonLibrary common_lib;
#endif

namespace Carina
{
class CommonLibrary
{
    Log             m_Logging;
#ifdef CE_MEMORY_DEBUG
    MemoryDebugger  m_MemoryDebug;
#endif
public:
	CommonLibrary() {}
	~CommonLibrary() {}
};
}